
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//全局样式
import "./assets/public.css"
//字体图标
import "./assets/fonts/iconfont.css"


// 全局注册第三方表格组件
import ZkTable from 'vue-table-with-tree-grid'
Vue.component('tree-table', ZkTable)

 import axios from 'axios'

 axios.defaults.baseURL='http://www.tangxiaoyang.vip:8888/api/v2/'
 axios.interceptors.request.use(config=>{
  //  console.log(config)
   const userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
   config.headers.Authorization = userInfo ? userInfo.token : ''
   return config
 })
 Vue.prototype.$http= axios

Vue.config.productionTip = false

Vue.use(ElementUI);
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
